<%@ page import="com.future.TaskUpdate; com.future.Task" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <g:set var="entityName" value="${message(code: 'task.label', default: 'Task')}"/>
  <title><g:message code="default.list.label" args="[entityName]"/></title>
  <script type="text/javascript" src="${resource(dir:'js/jquery',file:'jquery-1.4.min.js')}"></script>
  <script type="text/javascript">$(function() {
    $('.list img').attr('width', 118).attr('height', 140)
  })</script>
</head>
<body>

<div class="body">
  <div class="nav">
    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Home</a></span>
    <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]"/></g:link></span>
  </div>
  <h1><g:message code="default.list.label" args="[entityName]"/></h1>
  <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
  </g:if>
  <div class="list">
    <table style="width:70%">
      <thead>
      <tr align="center">

        <g:sortableColumn property="id" title="点此按照id进行排序"/>

      </tr>
      </thead>
      <tbody>
      <g:each in="${taskInstanceList}" status="i" var="taskInstance">
        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
          <td>
            <table style="width:100%" border="1">
              <tr>

                <td colspan="8" style="text-align:right">
                  <g:link action="taskInfo" id="${taskInstance.id}">更新task信息</g:link>&nbsp;
                  <g:link action="taskThink" id="${taskInstance.id}">添加完成后的想法</g:link>&nbsp;
                  <g:link action="taskUpgrade" id="${taskInstance.id}">项目进步</g:link>&nbsp;
                  <g:link action="designed" id="${taskInstance.id}">项目设计目的</g:link>&nbsp;
                  <g:link action="functionList" id="${taskInstance.id}">功能列表</g:link>&nbsp;
                  <g:link action="personalEvaluation" id="${taskInstance.id}">个人成果分析</g:link>&nbsp;
                  <input type="button" style="width:180px;height:20px;color:red;" value="add a new version > ${getVersion(taskInstance:taskInstance)}" onclick="window.location.href('${createLink(action:'listByTask',controller:'taskUpdate',id:taskInstance.id)}')"></td></tr>
              <tr>
                <td rowspan="3" scope="col">
                   ${fieldValue(bean: taskInstance, field: "id")}
                </td>
                <th scope="col">Task 编号</th>
                <th align="left" valign="top" scope="col"><g:link action="show" id="${taskInstance.id}">${fieldValue(bean: taskInstance, field: "taskSerialNumber")}</g:link></th>
                <th colspan="2" scope="col">任务名称:${fieldValue(bean: taskInstance, field: "taskName")}</th>
                <th scope="col" style="word-break:keep-all">任务更新日期</th>
                <th scope="col">${fieldValue(bean: taskInstance, field: "lastUpdate")}</th>
              </tr>
              <tr>
                <td height="70">开始日期</td>
                <td align="left" valign="top">${fieldValue(bean: taskInstance, field: "taskPlanBeginDate")}</td>
                <td width="127" rowspan="2" align="left" valign="top"><label>
                  <img src="${createLink(controller:"task", action:"showImage",id:taskInstance.id)}"  name="imageField" width="118" height="140" id="imageField" type="image"/>
                  </label></td>
                <td width="184" rowspan="2" align="left" valign="top">
                  <div style="OVERFLOW-X:hidden;OVERFLOW-Y:Scroll;SCROLLBAR-FACE-COLOR:#ffffff;FONT-SIZE:11px;PADDING-BOTTOM:0px;SCROLLBAR-HIGHLIGHT-COLOR:#ffffff;OVERFLOW:auto;WIDTH:184px;SCROLLBAR-SHADOW-COLOR:#919192;COLOR:#006600;SCROLLBAR-3DLIGHT-COLOR:#ffffff;LINE-HEIGHT:100%;SCROLLBAR-ARROW-COLOR:#919192;PADDING-TOP:5px;padding-bottom:5px;SCROLLBAR-TRACK-COLOR:#ffffff;FONT-FAMILY:'宋体';SCROLLBAR-DARKSHADOW-COLOR:#ffffff;LETTER-SPACING:1pt;HEIGHT:140px;TEXT-ALIGN:left;word-break:break-all;">
                    ${fieldValue(bean: taskInstance, field: "taskInfo").decodeHTML()}
                  </div>
                </td>
                <td>完成度</td>
                <td>${fieldValue(bean: taskInstance, field: "taskCompleteRate")}</td>
              </tr>
              <tr>
                <td height="70">结束日期</td>
                <td align="left" valign="top">${fieldValue(bean: taskInstance, field: "taskPlanCompleteDate")}</td>
                <td>工作效率</td>
                <td></td>
              </tr>
            </table>
          </td>
        </tr>
      </g:each>
      </tbody>
    </table>
  </div>
  <div class="paginateButtons">
    <g:paginate total="${taskInstanceTotal}"/>
  </div>
</div>
</body>
</html>
